package com.qxzn.module.health.activity;

import android.os.Bundle;
import android.view.View;

import com.github.jdsjlzx.interfaces.OnItemClickListener;
import com.github.jdsjlzx.interfaces.OnLoadMoreListener;
import com.github.jdsjlzx.interfaces.OnRefreshListener;
import com.github.jdsjlzx.recyclerview.LRecyclerView;
import com.github.jdsjlzx.recyclerview.LRecyclerViewAdapter;
import com.qxzn.app.page.BaseActivity;
import com.qxzn.module.health.R;
import com.qxzn.module.health.R2;
import com.qxzn.module.health.adapter.MemberAdapter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import butterknife.BindView;

public class MembersActivity extends BaseActivity implements OnRefreshListener, OnLoadMoreListener {
    private List<Integer> members = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5));

    @BindView(R2.id.members_recycle_view)
    LRecyclerView membersRecycler;

    @Override
    protected int initLayout() {
        return R.layout.lmc_activity_members;
    }

    @Override
    protected void initView() {
        LRecyclerViewAdapter adapter = new LRecyclerViewAdapter(new MemberAdapter(members));
        adapter.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(View view, int position) {
                // todo 点击
            }
        });
        membersRecycler.setAdapter(adapter);
        membersRecycler.setPullRefreshEnabled(false);
        membersRecycler.setLoadMoreEnabled(false);
//        membersRecycler.setOnLoadMoreListener(this);
//        membersRecycler.setOnRefreshListener(this);
    }

    @Override
    protected void iniTitleBar() {
        tv_title.setText("全部家庭成员");
    }

    @Override
    protected void initData(Bundle savedInstanceState) {

    }

    @Override
    public void onRefresh() {

    }

    @Override
    public void onLoadMore() {

    }
}
